import { randomUUID } from 'node:crypto';
import { defineEventHandler, readBody } from 'h3';

export default defineEventHandler(async (event) => {
  const _body = await readBody(event);

  // 模拟注册逻辑
  const resourceId = randomUUID();

  return {
    success: true,
    resourceId,
    message: '资源注册成功',
    errors: [],
  };
});
